# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=lxqt-qtplugin
pkgver=1.1.0
pkgrel=0
pkgdesc="Qt-LXQt plugin integration"
url="https://github.com/lxqt/lxqt-qtplugin"
arch="all !s390x" # s390x blocked by libfm-qt
arch="$arch !armhf" # armhf blocked by liblxqt-dev
license="LGPL-2.0-or-later"
makedepends="
	cmake samurai lxqt-build-tools liblxqt-dev libdbusmenu-qt-dev
	libfm-qt-dev qt5-qttools-dev
	"
options="!check" # No testsuite
source="https://github.com/lxqt/lxqt-qtplugin/releases/download/$pkgver/lxqt-qtplugin-$pkgver.tar.xz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="
37d3e8cda1f912482362d0bae4df65657f204c43734a8a0ca27c7a88819e9fc0aa089863ab08f50e47ef555e7f032b108cf5b97153525b4562d9b643b51d1240  lxqt-qtplugin-1.1.0.tar.xz
"
